function analyze_pathways_with_separate_parameters()
    tStart = tic;
    tElapsed = 0;
    
    model = evalin('base', 'model');
    listOfPathways = evalin('base', 'listOfPathways');
    defines = evalin('base', 'defines');
   
    arrayOfAllPathwaysWeights = [];
    analyzedPathways = [];
    assignin('base', 'arrayOfAllPathwaysWeights', arrayOfAllPathwaysWeights);
    assignin('base', 'analyzedPathways', analyzedPathways);
    
    if isempty(listOfPathways)
        message = 'Returning back - na data to fill!'
        return;
    end
    
    message = 'Launching Cobra! ....'
    initCobraToolbox;
    analysisCoeficients = splitStringToCells(defines.analysisCoeficients);
   
  
    bar = waitbar(0,'Please wait... Looking for all pathways');
    for i = 1: length(listOfPathways)
         waitbar(i/length(listOfPathways), bar, [num2str(i), ' Pathways of ', num2str(length(listOfPathways)), ' total' ])
         drawnow
         disp(['##### PATHWAY: ' num2str(i)]);
         currentPathway = listOfPathways{i};
                
         [pathwayStatstics, listOfPoolMetabolitesInPathway,zeroSolutionFBA, ...
                listOfPathwaysWhereReactionsArePresented, arrayOfWeightsOfPathway, returnModel]= ...
                    get_pathway_statistics(currentPathway, model,  false, false);

         if ~zeroSolutionFBA
           index = 0;


            resultArr = [0 0 0 0 0 0 0 0 i 0];
            resultArr(1) = arrayOfWeightsOfPathway(2);
            resultArr(2) = arrayOfWeightsOfPathway(4);
            resultArr(3) = arrayOfWeightsOfPathway(3);
            resultArr(4) = arrayOfWeightsOfPathway(1);
            resultArr(5) = 0;
            resultArr(6) = arrayOfWeightsOfPathway(5);
            resultArr(7) = arrayOfWeightsOfPathway(6);

            arrayOfAllPathwaysWeights = [arrayOfAllPathwaysWeights; resultArr];
            for iw = 1 : length(arrayOfAllPathwaysWeights(:,1))
                firstParam = calculate_integral_weight(arrayOfAllPathwaysWeights(iw,1), ... 
                min(arrayOfAllPathwaysWeights(:,1)), ...
                max(arrayOfAllPathwaysWeights(:,1)), ...
                str2num(analysisCoeficients{1}), false)

                secondParam = calculate_integral_weight(arrayOfAllPathwaysWeights(iw,2), ... 
                min(arrayOfAllPathwaysWeights(:,2)), ...
                max(arrayOfAllPathwaysWeights(:,2)), ...
                str2num(analysisCoeficients{2}), false)

                thirdParam = calculate_integral_weight(arrayOfAllPathwaysWeights(iw,3), ... 
                min(arrayOfAllPathwaysWeights(:,3)), ...
                max(arrayOfAllPathwaysWeights(:,3)), ...
                str2num(analysisCoeficients{3}), false)

                fourthParam = calculate_integral_weight(arrayOfAllPathwaysWeights(iw,4), ... 
                min(arrayOfAllPathwaysWeights(:,4)), ...
                max(arrayOfAllPathwaysWeights(:,4)), ...
                str2num(analysisCoeficients{4}), true)

                fiftParam = calculate_integral_weight(arrayOfAllPathwaysWeights(iw,5), ... 
                min(arrayOfAllPathwaysWeights(:,5)), ...
                max(arrayOfAllPathwaysWeights(:,5)), ...
                str2num(analysisCoeficients{5}), true)

                sixtParam = calculate_integral_weight(arrayOfAllPathwaysWeights(iw,6), ... 
                min(arrayOfAllPathwaysWeights(:,6)), ...
                max(arrayOfAllPathwaysWeights(:,6)), ...
                str2num(analysisCoeficients{6}), true)

                seventhParam = calculate_integral_weight(arrayOfAllPathwaysWeights(iw,7), ... 
                min(arrayOfAllPathwaysWeights(:,7)), ...
                max(arrayOfAllPathwaysWeights(:,7)), ...
                str2num(analysisCoeficients{7}), true)

                weight = firstParam + secondParam + thirdParam + fourthParam + fiftParam + sixtParam + seventhParam;

                arrayOfAllPathwaysWeights(iw,8) = weight;
            end
          
            sorting = [-8];
          
          
          [arrayOfAllPathwaysWeights, e] = sortrows(arrayOfAllPathwaysWeights,sorting);
          
           arrTemporary = arrayOfAllPathwaysWeights(length(arrayOfAllPathwaysWeights(:,1)),:);

           if length(arrayOfAllPathwaysWeights(:,1)) > str2num(defines.numberOfBestPathwaysReturned) 
               index = arrTemporary(9);
               arrayOfAllPathwaysWeights(length(arrayOfAllPathwaysWeights(:,1)),:) = [];
           end

           resultsStructure = struct('PATHWAY','', ...
                                'MODEL','', ...
                                'STATISTICS', '', ...
                                'POOL_METABOLITES', '', ...
                                'ORGANISM_PATHWAYS', '', ...
                                'WEIGHTS_OF_PATHWAY', '', ...
                                'NUMBER_OF_PATHWAY',0);

          cPathway = {}; 
          for il=1:length(currentPathway(:, 1))
              if currentPathway(il) == 'C'
                  compoundStructure = get_compound_information(currentPathway(il,:));
                  cPathway{il} = [currentPathway(il,:) ' - ' compoundStructure.NAME];
              else
                  reactionStructure = get_reaction_information(currentPathway(il,:));
                  cPathway{il} = [currentPathway(il,:) ' - ' reactionStructure.NAME];
              end
          end    
          resultsStructure.PATHWAY = equalise_lengths(cPathway);
          resultsStructure.MODEL = returnModel;
          resultsStructure.STATISTICS = pathwayStatstics;

          if ~isempty(listOfPoolMetabolitesInPathway)
              cPathway = {}; 
              for ik=1:length(listOfPoolMetabolitesInPathway(:,1))
                  compoundStructure = get_compound_information(listOfPoolMetabolitesInPathway(ik,:));
                  cPathway{ik} = [listOfPoolMetabolitesInPathway(ik,:) ' - ' compoundStructure.NAME];
              end    
              resultsStructure.POOL_METABOLITES = equalise_lengths(cPathway); 
          end

          if ~isempty(listOfPathwaysWhereReactionsArePresented)
            resultsStructure.ORGANISM_PATHWAYS = equalise_lengths(listOfPathwaysWhereReactionsArePresented(:,1));
          end

          resultsStructure.WEIGHTS_OF_PATHWAY = arrayOfWeightsOfPathway;
          resultsStructure.NUMBER_OF_PATHWAY = i; 
          analyzedPathways = [analyzedPathways; resultsStructure];

          if ~index == 0
              analyzedPathwaysTemporary = analyzedPathways;
              for j = 1:length(analyzedPathwaysTemporary)
                 pathTemporary = analyzedPathwaysTemporary(j);
                 if isequal(pathTemporary.NUMBER_OF_PATHWAY, index)
                     analyzedPathways(j)=[];
                 end
              end
              clear analyzedPathwaysTemporary;
          end
        else
           message = 'Zero solution for FBA. Skipping this pathway!!!'
        end           
    end
    close(bar)
    
    tElapsed = toc(tStart)
    
    assignin('base', 'arrayOfAllPathwaysWeights', arrayOfAllPathwaysWeights);
    assignin('base', 'analyzedPathways', analyzedPathways);
    assignin('base', 'tElapsedAnalyzis', tElapsed);
   
    clear arrayOfAllPathwaysWeights;
    clear analyzedPathways;
    clear listOfPathways;
    clear defines;
    clear model;
end

